home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 19 / CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso / CUCD / Readers / Gui4Cli / Dir / dir.g2 < prev    next >
Text File  |  1997-12-02  |  2KB  |  110 lines

  1. G4C
  2.  
  3. ;  helper gui for dealing with files
  4.  
  5. ;  THE POP-UP ON DOUBLE-CLICK GUIs
  6.  
  7.  
  8. WinBig 0 0 80 90 ""
  9. WinType 00001000
  10. winonmouse 30 7 
  11. varpath dir.gc/cli.gc    ; the guis whose vars we need
  12.  
  13. xOnRMB 
  14. guiclose Dir.g2
  15.  
  16. xOnInactive
  17. guiclose Dir.g2
  18.  
  19. xOnFail
  20. ezreq "Error during operation" OK ""
  21.  
  22. ;---------------> the Buttons
  23.  
  24. xbutton 0 0 0 15 Auto
  25. guiclose dir.g2
  26. ; using the new routines
  27. guiload guis:tools/rtn/GetFileType $dir.gc/lv_file
  28. filetype = $$ret.0
  29. if $filetype > ''
  30.     guiload guis:tools/rtn/ViewFile $dir.gc/lv_file $dir.g2/filetype RUN
  31. endif
  32.  
  33. xbutton 0 15 0 15 More..
  34. guiopen dir.pop2
  35. guiclose dir.g2
  36.  
  37. xbutton 0 30 0 15 List
  38. *FILENAME = $lv_file
  39. guiload guis:tools/read.gc
  40. guiopen read.gc
  41.  
  42. xbutton 0 45 0 15 Cli..        ; call the cli.gc gui with FileName & Mode
  43. cd $$lv.dir
  44. guiclose dir.g2
  45. guiload guis:tools/cli.gc $dir.gc/lv_file RUN
  46.  
  47. xbutton 0 60 0 15 'Edit'
  48. ifexists port rexx_ced        ; if the CygnusEd editor is running..
  49.    ifexists gui cedbar.gc    ; use it for the editing
  50.        guiscreen cedbar.gc front
  51.    else
  52.        guiscreen dir.g2 back    ; hoping that Ced is the next screen..
  53.    endif
  54.    sendrexx rexx_ced 'open new'
  55.    sendrexx rexx_ced 'open $lv_file'
  56.    sendrexx rexx_ced 'expand view'
  57. else
  58.    run '$*DEF.EDITOR $lv_file'
  59. endif
  60. guiclose dir.g2
  61.  
  62. xbutton 0 75 0 15 Rx
  63. guiclose dir.g2
  64. cli 'rx $lv_file'
  65.  
  66.  
  67. ;#########################################################################
  68.  
  69. NEWFILE dir.pop2    ; Pop-up on double-click "More.." gui.
  70.  
  71. WinBig 0 0 80 90 ""
  72. WinType 00001000
  73. winonmouse 30 7 
  74. varpath dir.gc/cli.gc/dir.search    ; the guis whose vars we need
  75.  
  76. xOnRMB
  77. guiclose Dir.pop2
  78.  
  79. xOnInactive
  80. guiclose Dir.pop2
  81.  
  82. xOnFail
  83. ezreq "Error during operation" OK ""
  84.  
  85. ;---------------> the Buttons
  86.  
  87. xbutton 0 0 0 15 'MView'
  88. guiclose dir.pop2
  89. run '$*DEF.DT $lv_file'
  90.  
  91. xbutton 0 15 0 15 'FRead'
  92. guiclose dir.pop2
  93. *FRGUIDE = $lv_file
  94. guiload guis:tools/fastread/fastread.gc
  95.  
  96. xbutton 0 30 0 15 'DPaint'
  97. guiclose dir.pop2
  98. run 'wbrun $*DEF.PAINT $lv_file'
  99.  
  100. xbutton 0 45 0 15 'GfxEd'
  101. run '$*DEF.GFXED $lv_file'
  102.  
  103. xbutton 0 60 0 15 'HexView'
  104. run '$*DEF.HEX $lv_file'
  105.  
  106. xbutton 0 75 0 15 'Mod'
  107. run '$*DEF.MOD $dir.gc/lv_file'
  108.  
  109.  
  110.